﻿namespace ExcelAutomator.ParameterPattern
{
	[ParameterPatternResolver(PatternIdDefinition)]
	internal class InputFilenameResolver : IParameterPatternResolver
	{
		public const string PatternIdDefinition = "%inputFilename";
		
		public string PatternId
		{
			get { return PatternIdDefinition; }
		}

		public string Resolve(string value,string propertyName, ExecutionContext context)
		{
			return context.InputFile.NameWithoutExtension();
		}
	}
}
